<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
        <el-table v-if="isDisplay === true"
            :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
            @sort-change="onSortChange($event)"  
            :border="isDragendCol"
            :highlight-current-row ="isSingleSelect"
            :row-class-name="getRowClassName.bind(_self)"
            :cell-class-name="getCellClassName.bind(_self)"
            size="mini"
            stripe
            :height="tableHeight"
            @row-click="rowClick($event)"  
            @select-all="selectAll($event)"  
            @select="select.apply(_self, arguments)"  
            @row-class-name="onRowClassName($event)"  
            @row-dblclick="rowDBLClick($event)"  
            ref="multipleTable" :data="items" :show-header="!isHideHeader"
        >
            <template slot="empty">
                {{$t('entities.projectstats.notcloseproject_grid.nodata')}} 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type="selection" :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('name')">
                <el-table-column show-overflow-tooltip :prop="'name'" :label="$t('entities.projectstats.notcloseproject_grid.columns.name')" :min-width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.name')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <app-column-link
                            deKeyField="project"
                            :context="JSON.parse(JSON.stringify(context))"
                            :viewparams="JSON.parse(JSON.stringify(viewparams))"
                            :data="row"
                            :linkview="{viewname: 'project-main-tab-exp-view', height: 850,width: 1400,title: $t('entities.project.views.maintabexpview.title'),placement: '', isRedirectView: false,deResParameters: [
            ]
            ,parameters: [
            { pathName: 'projects', parameterName: 'project' },
            { pathName: 'maintabexpview', parameterName: 'maintabexpview' }
            ]}"
                            valueitem="srfkey"
                        >
                            <span>{{row.name}}</span>
                        </app-column-link>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('end')">
                <el-table-column show-overflow-tooltip :prop="'end'" :label="$t('entities.projectstats.notcloseproject_grid.columns.end')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.end')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data format="YYYY-MM-DD" :data="row.end"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('status')">
                <el-table-column show-overflow-tooltip :prop="'status'" :label="$t('entities.projectstats.notcloseproject_grid.columns.status')" :width="80"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.status')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <codelist :value="row.status" tag="Project__status" codelistType="STATIC" ></codelist>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('totalestimate')">
                <el-table-column show-overflow-tooltip :prop="'totalestimate'" :label="$t('entities.projectstats.notcloseproject_grid.columns.totalestimate')" :width="80"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.totalestimate')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="2" :data="row.totalestimate"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('totalconsumed')">
                <el-table-column show-overflow-tooltip :prop="'totalconsumed'" :label="$t('entities.projectstats.notcloseproject_grid.columns.totalconsumed')" :width="80"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.totalconsumed')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.totalconsumed"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('totalleft')">
                <el-table-column show-overflow-tooltip :prop="'totalleft'" :label="$t('entities.projectstats.notcloseproject_grid.columns.totalleft')" :width="80"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.totalleft')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <app-format-data dataType="FLOAT" precision="0" :data="row.totalleft"></app-format-data>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('totalwh')">
                <el-table-column show-overflow-tooltip :prop="'totalwh'" :label="$t('entities.projectstats.notcloseproject_grid.columns.totalwh')" :width="80"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.totalwh')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                            <span>{{row.totalwh}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('progress')">
                <el-table-column show-overflow-tooltip :prop="'progress'" :label="$t('entities.projectstats.notcloseproject_grid.columns.progress')" :width="150"  :align="'center'">
                    <template v-slot:header="{column}">
                       <span class="column-header ">
                        {{$t('entities.projectstats.notcloseproject_grid.columns.progress')}}
                       </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
                                  <span><over-progress :data="row.totalconsumed && row.totalwh && row.totalconsumed != 0 ? row.totalconsumed/row.totalwh : ''"></over-progress></span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
        </el-table>
    </i-form>
</div>